</head>
<body>
	<div id="header-wrap">
    	<div class="container clearfix">
        	<div class="logo-wrap clearfix">
            	<div class="logo"><a href="<?=base_url('')?>"><img src="<?=base_url('static/index/images/logo.png')?>" alt="logo" /></a></div>
                <div class="wrap"></div>
            </div>
            <div class="publish_project">
            	<a href="<?=site_url('Main/add_project')?>" class="publish_project_btn">发布项目</a>
            </div>
            <div class="primary-menu">
            	<?php if(isset($_SESSION['username'])&&!empty($this->session->userdata('username'))){ ?>
            	<div class="user_box">
            		<em><?=$this->session->userdata('username')?></em>
            		<?php if($_SESSION['no_read_count']){ ?>
            			<a href="<?=site_url('Message')?>"><img src="<?=base_url('static/index/images/resizeApi1.png')?>" />
            			<b>(<?=$_SESSION['no_read_count']?>)</b></a>
            		<?php }else{ ?>
            			<a href="<?=site_url('Message')?>"><img src="<?=base_url('static/index/images/resizeApi.png')?>" /></a>
            		<?php } ?>
            		<span class="control_select">
            			<a href="<?=site_url('User_center')?>" id="MySpace">我的空间</a>
            			<ul>
            				<li><a href="<?=site_url('User_center')?>">修改资料</a></li>
            				<li><a href="<?=site_url('User_center/my_create_project')?>">我的发起</a></li>
            				<li><a href="<?=site_url('Message')?>">我的信息</a></li>
            			</ul>
            		</span>
            		<a href="<?=site_url('Logout')?>">退出</a>
            	</div>
            	<?php }else{ ?>
                <ul class="clearfix">
                    <li><a href="<?=site_url('Login/index')?>">登录</a></li>
                    <li><a href="<?=site_url('Register/index')?>">注册账户</a></li>
                </ul>
                <?php } ?>
             </div>
        </div>
    </div>
    
    <div id="nav">
    	<ul class="navUl clearfix">
        	<li><a href="<?=site_url('Main')?>">全部</a></li>
        	<?php foreach ($category_list as $row): ?>
            	<li><a href="<?=site_url('Main/index/'.$row['cid'])?>"><?=$row['cname']?></a></li>
            <?php endforeach; ?>
        </ul>
    </div>